// 轮播查询
const {searchLB} = require("../mysql.js")
const express = require("express")
const lunbo = express.Router()

lunbo.get("/lunbo",(req,res)=>{
    let sql = "select * from xz_index_carousel"
    searchLB(sql).then(result=>{
        // console.log(result);
        res.send({
            code:200,
            message:'查询成功',
            data:result
        })
    }).catch(err=>{
        // console.log(err);
        res.send({
            code:200,
            message:'查询失败'
        })
    })
})

module.exports = {
    lunbo
}